<?php
use yii\helpers\Html;
use backend\utils\XHtml;

/* @var $this yii\web\View */

$this->title = '内容页';
$this->params['breadcrumbs'][] = $this->title;
?>
<?php $this->beginBlock('content-header'); ?>
<?= $this->title . ' ' . XHtml::create('内容页', ['post-create']) ?>
<?php $this->endBlock(); ?>
<div class="box box-primary">
    <div class="box-body">
        <?= Html::beginTag("div", ['class' => 'grid-view']) ?>
        <?= Html::beginTag("table", ['class' => 'table table-striped table-bordered']) ?>
        <?= Html::beginTag("tr") ?>
        <?= Html::beginTag("th") ?>文件名<?= Html::endTag("th") ?>
        <?= Html::beginTag("th") ?>描述<?= Html::endTag("th") ?>
        <?= Html::beginTag("th") ?>母版页<?= Html::endTag("th") ?>
        <?= Html::beginTag("th") ?>最后修改日期<?= Html::endTag("th") ?>
        <?= Html::beginTag("th") ?>操作<?= Html::endTag("th") ?>
        <?= Html::endTag("tr") ?>
        <?php foreach ((array)$files as $file) { ?>
            <?= Html::beginTag("tr") ?>
            <?= Html::beginTag("td") ?><?= $file['basename'] ?><?= Html::endTag("td") ?>
            <?= Html::beginTag("td") ?><?= $file['name'] ?><?= Html::endTag("td") ?>
            <?= Html::beginTag("td") ?><?= $file['layout'] ?><?= Html::endTag("td") ?>
            <?= Html::beginTag("td") ?><?= $file['datetime'] ?><?= Html::endTag("td") ?>
            <?= Html::beginTag("td") ?>
            <?= Html::a('<span class="glyphicon glyphicon-pencil"></span>', ['post-update', 'id' => $file['filename']], ['title' => '编辑']) ?>
            <?= Html::a('<span class="glyphicon glyphicon-trash"></span>', ['post-delete', 'id' => $file['filename']], ['title' => '删除', 'data-confirm' => '您确定要删除此项吗？']) ?>
            <?= Html::endTag("td") ?>
            <?= Html::endTag("tr") ?>
        <?php } ?>
        <?= Html::endTag('table') ?>
        <?= Html::endTag('div') ?>
    </div>
</div>